package mr.ali.videoapp.portal.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import mr.ali.videoapp.portal.model.CollectionImg;
import mr.ali.videoapp.portal.mapper.CollectionImgMapper;
import mr.ali.videoapp.portal.service.ICollectionImgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr-ali
 * @since 2025-06-30
 */
@Service
public class CollectionImgServiceImpl extends ServiceImpl<CollectionImgMapper, CollectionImg> implements ICollectionImgService {

    @Resource
    private CollectionImgMapper collectionImgMapper;

@Override
public List<CollectionImg> findByIdAll(Integer videoId){
    // 创建查询条件包装器
    QueryWrapper<CollectionImg> wrapper = new QueryWrapper<>();
    wrapper.eq("video_id", videoId);
    // 根据查询条件获取视频列表
    List<CollectionImg> videoList = collectionImgMapper.selectList(wrapper);
    return videoList;
}




}
